/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.insurance.cis.scos;

/**
 *
 * @author TruongLQ
 */
public class ChannelSearchCondition {

    Integer channelID;
    String channelDesc;

    public ChannelSearchCondition(String channelID,
            String channelDesc) {
        if (!channelID.isEmpty()) {
            this.channelID = Integer.parseInt(channelID);
        } else {
            this.channelID = null;
        }
        this.channelDesc = channelDesc;
    }

    public Integer getChannelID() {
        return channelID;
    }

    public String getChannelDesc() {
        return channelDesc;
    }

    public void setChannelID(Integer channelID) {
        this.channelID = channelID;
    }

    public void setChannelDesc(String channelDesc) {
        this.channelDesc = channelDesc;
    }
    
    public boolean isEmptyCondition() {
        return channelID==null 
                && (channelDesc==null||channelDesc.isEmpty());
    }
}
